﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace PubSubWeb.Model
{
    public class Topic
    {
        private string url;

        private DateTime lastPublishTime;

        private Dictionary<string, Subscription> subscriptions;

        public Topic(string url)
        {
            this.URL = url;
            this.LastPublishTime = DateTime.MinValue;
            this.subscriptions = new Dictionary<string, Subscription>();
        }

        public string URL
        {
            get { return this.url; }
            set { this.url = value; }
        }

        public DateTime LastPublishTime
        {
            get { return this.lastPublishTime; }
            set { this.lastPublishTime = value; }
        }

        public Dictionary<string, Subscription> Subscriptions 
        {
            get { return this.subscriptions; }
        }
    }
}
